package com.xps.and.yuntong.Data.bean1;

import com.google.gson.Gson;

import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by Administrator on 2018/1/29.
 */

public class ArrivedDestination {

    @Override
    public String toString() {
        return "ArrivedDestination{" +
                "return_code='" + return_code + '\'' +
                ", return_msg='" + return_msg + '\'' +
                ", return_body=" + return_body +
                '}';
    }

    /**
     * return_code : SUCCESS
     * return_msg : 操作成功
     * return_body : {"isCompleted":"YES"}
     */

    private String return_code;
    private String return_msg;
    private ReturnBodyBean return_body;

    public static ArrivedDestination objectFromData(String str) {

        return new Gson().fromJson(str, ArrivedDestination.class);
    }

    public static ArrivedDestination objectFromData(String str, String key) {

        try {
            JSONObject jsonObject = new JSONObject(str);

            return new Gson().fromJson(jsonObject.getString(str), ArrivedDestination.class);
        } catch (JSONException e) {
            e.printStackTrace();
        }

        return null;
    }

    public String getReturn_code() {
        return return_code;
    }

    public void setReturn_code(String return_code) {
        this.return_code = return_code;
    }

    public String getReturn_msg() {
        return return_msg;
    }

    public void setReturn_msg(String return_msg) {
        this.return_msg = return_msg;
    }

    public ReturnBodyBean getReturn_body() {
        return return_body;
    }

    public void setReturn_body(ReturnBodyBean return_body) {
        this.return_body = return_body;
    }

    public static class ReturnBodyBean {
        /**
         * isCompleted : YES
         */

        private String isCompleted;

        public static ReturnBodyBean objectFromData(String str) {

            return new Gson().fromJson(str, ReturnBodyBean.class);
        }

        public static ReturnBodyBean objectFromData(String str, String key) {

            try {
                JSONObject jsonObject = new JSONObject(str);

                return new Gson().fromJson(jsonObject.getString(str), ReturnBodyBean.class);
            } catch (JSONException e) {
                e.printStackTrace();
            }

            return null;
        }

        public String getIsCompleted() {
            return isCompleted;
        }

        public void setIsCompleted(String isCompleted) {
            this.isCompleted = isCompleted;
        }
    }
}
